import Ajax from "./Ajax"
const prefix = "/api"
const prefix2 = "http://localhost:3000/api"
//首页轮播数据
export const getsildeData = (params) => {
	return Ajax(prefix + "/visual/view", params, "post")
}
//秒杀数据
export const getlimitData = (params) => {
	return Ajax(prefix + "/visual/visual_seckill", params)
}
//商品列表数据
export const getmoreData = (params) => {
	return Ajax(prefix + "/goods/type_list", params)
}
//首页分类标题数据
export const getcategorylistData = (params) => {
	return Ajax(prefix + "/catalog/list", params)
}
//首页分类上方内容数据
export const getcategoryData = (params) => {
	return Ajax(prefix + "/visual/visual_second_category", params)
}
//首页分类下方列表数据
export const getcategorylist = (params) => {
	return Ajax(prefix + "/catalog/goodslist", params, "post")
}
//分类右方数据
export const getcategoryrightData = (cat_id) => {
	return Ajax(prefix + "/catalog/list/" + cat_id)
}
//详情页数据
export const getdetail = (params) => {
	return Ajax(prefix + "/goods/show", params, "post")
}
//账号登录
export const getLogin = (params) => {
	return Ajax(prefix2 + "/login", params, "post")
}
//获取短信验证码
export const getPhoneCodeApi = (params) => {
	return Ajax(prefix2 + "/phonecode", params, "post")
}
//短信登录
export const getPhoneLoginApi = (params) => {
	return Ajax(prefix2 + "/phonelogin", params, "post")
}